﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication06
{
    public abstract class Talk
    {
        public abstract void speak();
        public virtual void goodbye()
        {
            Console.WriteLine("Says goodbye!");
        }
    }
    public class SayHello : Talk
    {
        public override void speak()
        {
            Console.WriteLine("Says Hello!");
        }
    }

    class Program
    {
        static void Main()
        {
            SayHello hello = new SayHello();
            hello.speak();
            hello.goodbye();
        }
    }
}